package com.supermap.application.dao;

import com.supermap.application.entity.TIndustry;
import org.springframework.data.domain.Example;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IndustryDao extends JpaRepository<TIndustry,String> {

    @Override
    <S extends TIndustry> List<S> findAll(Example<S> example);

    @Override
    <S extends TIndustry> S findOne(Example<S> example);

    @Query("select t from TIndustry t where t.a00011 = :A00011")
    TIndustry findOneByA00011(@Param("A00011") String A00011);
}
